<%@page import="com.ereport.entity.MblExpenses"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.DateFormat"%>
<%@page import="java.util.List"%>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>
<link rel="stylesheet" href="<%=application.getContextPath()%>/css/datatable.css"/>
<script type="text/javascript" language="javascript" src="<%=application.getContextPath()%>/js/jquery.dataTables.js"></script>
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
		$('#mblExpnsTable').dataTable();
	} );
</script>
<style>
<!--
.dataTables_filter{
height: 45px;
width:150px;
}
.dataTables_filter input{
width:150px;
 height:20px;
  background:#e8e8e8;
   border-radius: 4px;
     border:1px solid #a1a1a1;
}
-->
</style>
<%
List<MblExpenses> explist=(List<MblExpenses>)request.getAttribute("explist");
if(explist!=null){
%>
      <table width="98%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td width="100%">
                    <div id="demo">
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#787878" class="tablebox" id="mblExpnsTable">
                        <thead>
                        <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                          <th width="23" height="30" align="center" valign="middle" class="hed">Sr. No </th>
                          <th width="144" align="center" valign="middle" class="hed">Month</th>
                          <th width="91" align="center" valign="middle" class="hed">Spend</th>
                          <th width="91" align="center" valign="middle" class="hed">Remarks</th>
                          <th width="110" align="center" valign="middle" class="hed">Created Date</th>
                         
                      </tr>
                      </thead>
                      <tbody>
                        <%
                        DateFormat cdfmt=new SimpleDateFormat("dd-MM-yyyy");
                  for(int i=0;i<explist.size();i++){
                	 String mn=explist.get(i).getMblMonth();
                	 if(mn.equals("01")){
                		mn="Jan";	 
                	 }else if(mn.equals("02")){
                		 mn="Feb";
                	 }else if(mn.equals("03")){
                		 mn="Mar";
                	 }else if(mn.equals("04")){
                		 mn="Apr";
                	 }else if(mn.equals("05")){
                		 mn="May";
                	 }else if(mn.equals("06")){
                		 mn="Jun";
                	 }else if(mn.equals("07")){
                		 mn="Jul";
                	 }else if(mn.equals("08")){
                		 mn="Aug";
                	 }else if(mn.equals("09")){
                		 mn="Sep";
                	 }else if(mn.equals("10")){
                		 mn="Oct";
                	 }else if(mn.equals("11")){
                		 mn="Nov";
                	 }else if(mn.equals("12")){
                		 mn="Dec";
                	 }
                	 String cdate="";
                     Date cdat=explist.get(i).getCreatedDate();
                     cdate=cdfmt.format(cdat.getTime());
                      
                  %>
                        <tr>
                          <td align="center" bgcolor="#cccccc"><%=i+1%></td>
                          <td bgcolor="#cccccc" align="center" title="<%=mn+"-"+explist.get(i).getMblYear()%>">
                          <%=mn+"-"+explist.get(i).getMblYear()%>
                        </td>
                          <td bgcolor="#cccccc" align="center" title="<%= explist.get(i).getMblSpend()%>">
                         	<%= explist.get(i).getMblSpend()%>
                         	
                          </td>
                          <td bgcolor="#cccccc" align="center" title="<%= explist.get(i).getRemarks()%>">
                         	<%= explist.get(i).getRemarks()%>
                         	
                          </td>
                          
                          <td  bgcolor="#cccccc" align="center" title="<%=cdate%>">
                           <%= cdate%>
                          </td>
            
                        </tr>
                        <%
                  			}
                        %>
                 </tbody>
                    </table>
                    </div>
                    </td>
                  </tr>
                 
              </table></td>
            </tr>
            <tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>
             
           	<tr>
           		<td align="left" >&nbsp;</td>
           			
           	</tr>	  
                  
          </table>
        
   <%
	}
    %>